//
//  DDDGAMEViewController.m
//  DDDgameSDK
//
//  Created by summerthread on 09/23/2020.
//  Copyright (c) 2020 summerthread. All rights reserved.
//

#import "DDDGAMEViewController.h"
#import <DDDgameSDK/DDDgameSDK.h>

@interface DDDGAMEViewController ()
@property (nonatomic ,strong) UIButton *enterBtn;
@end

@implementation DDDGAMEViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.enterBtn.frame = CGRectMake(30.0, 100.0, [UIScreen mainScreen].bounds.size.width - 60.0, 50.0);
    [self.view addSubview:self.enterBtn];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)clickBtnAction:(UIButton *)sender {
    [DDDGameManager presentListViewController:self userId:@"123456" advertType:0];
}
- (UIButton *)enterBtn {
    if (!_enterBtn) {
        _enterBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_enterBtn setTitle:@"打开游戏" forState:UIControlStateNormal];
        [_enterBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _enterBtn.backgroundColor = [UIColor redColor];
        [_enterBtn addTarget:self action:@selector(clickBtnAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _enterBtn;
}
@end
